package cn.funcat.map.tile
{
	import cn.funcat.map.layer.bound.BoundBase;
	
	import flash.geom.Rectangle;
	/**
	 * 
	 * @author daniel
	 * 
	 */	
	public class TileContextBase implements ITileContext
	{
		protected var _bound:BoundBase;
		
		public function getTileURL(x:Number, y:Number, z:Number):String{
			return null;
		}
		
		protected function inBound(x:Number, y:Number, z:Number):Boolean{
			var rect:Rectangle;
			switch(z){
				case 1:
					rect = this._bound.zoom1Bound;
					break;
				case 2:
					rect = this._bound.zoom2Bound;
					break;
				case 3:
					rect = this._bound.zoom3Bound;
					break;
				case 4:
					rect = this._bound.zoom4Bound;
					break;	
			}
			return rect.contains(x, y);
		}	
	}
}